package com.example.myproject.patternmodel.strategy;

/**
 * Created by xi on 2018/8/14.
 */
public class Client {
    public static void main(String[] args) {
        CustomerContext customer = new CustomerContext();
        customer.buy(500D);
        System.out.println("客户需要付钱：" + customer.calLastAmount());
        customer.buy(1200D);
        System.out.println("客户需要付钱：" + customer.calLastAmount());
        customer.buy(1200D);
        System.out.println("客户需要付钱：" + customer.calLastAmount());
        customer.buy(1200D);
        System.out.println("客户需要付钱：" + customer.calLastAmount());
    }
}
